#ifndef _BOUNDINGBOX_H_
#define _BOUNDINGBOX_H_

#include <glm/glm.hpp>
#include <array>

namespace SEngine
{
    struct BoundingBox {
        glm::vec3 min{FLT_MAX};
        glm::vec3 max{-FLT_MAX};
        float Distance(glm::vec3 p);
        bool Contained(glm::vec3 p);
        glm::vec3 Center() { return (min + max) * 0.5f;}
        std::array<glm::vec3, 8> Corners();
        std::array<BoundingBox, 8> Split();
        std::array<std::pair<glm::vec3, glm::vec3>, 12> Lines();
        BoundingBox Transform(glm::mat4 mat);
    };
} // namespace SEngine


#endif